package com.victor.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.victor.entity.Administrator;
import com.victor.entity.Banner;

@Mapper
public interface BannerDao {

	/**
	 * 添加banner
	 * @param banner
	 * @return
	 */
	int insert(Banner banner);
	
	
	/**
	 * 修改banner信息
	 * @param banner
	 * @return
	 */
	boolean update(Banner banner);
	
	/**
	 * 根据id批量删除banner
	 * @param ids
	 * @return
	 */
	int batchDelete(@Param("ids") int[] ids);
	
	/**
	 * 查询所有banner
	 * @return
	 */
	@Select({"select * from banner"})
	List<Banner> selectAll();
	

	/**
	 * 通过参数查询banner
	 * @return
	 */
	List<Banner> selecByPara(Banner banner);
}
